<table class="detail_list" border="0">
	<tr>
		<th width="150">{$lang.flow_name}</th>
		{stat_product type='th' flow='warehouse' value='' width='120'}
		{stat_product type='th' flow='storage_format' value='' width='150'}
		{stat_product type="th" flow="storage_format" value=$lang.quantity width="120"}
		<th width="150">{$lang.sum_quantity}</th>
		{stat_product type='th' flow='color' value='' width="150"}
		{stat_product type='th' flow='size' value='' width="150"}
		{stat_product type='th' flow='storage_mantissa' value='' width="50"}
		<th>&nbsp;</th>
	</tr>
	{if C('instock.add')==2 && $rights.instock }
	<!-- 订货未装柜 -->
	<tr>
		<td class="t_right">{$lang.unload_quantity}</td>
		{stat_product type='td' flow='warehouse' value=''}
		{stat_product type='td' flow='storage_format' value=''}
		{if 'order.storage_format'|C>=2}	
		{stat_product type='td' flow='storage_format' value=$run_info.unload_sum_qn url=U("/StatProduct/orderUnload/type/order/id/$id") title="orderUnload"|title:"StatProduct" class="t_right"}
		{else}
		{stat_product type='td' flow='storage_format' value=''}
		{/if}
		
		<td class="t_right"><a href="javascript:;" onclick="addTab('{"/StatProduct/orderUnload/type/order/id/$id"|U}','{"orderUnload"|title:"StatProduct"}')">{$run_info.unload_quantity}</a></td>
		{stat_product type='td' flow='color' value=''}
		{stat_product type='td' flow='size' value=''}
		{stat_product type='td' flow='storage_mantissa' value='' }
		<td>&nbsp;</td>
	</tr>
	<!-- 装柜未入库 -->
	<tr>
		<td class="t_right">{$lang.uninstock_quantity}</td>
		{stat_product type='td' flow='warehouse' value=''}
		{stat_product type='td' flow='storage_format' value=''}
		{stat_product type='td' flow='storage_format' value=$run_info.unstock_sum_qn url=U("/StatProduct/loadUninstock/type/load/id/$id") title="loadUninstock"|title:"StatProduct" class="t_right"}
		
		<td class="t_right"><a href="javascript:;" onclick="addTab('{"/StatProduct/loadUninstock/type/load/id/$id"|U}','{"loadUninstock"|title:"StatProduct"}')">{$run_info.unstock_quantity}</a></td>
		{stat_product type='td' flow='color' value=''}
		{stat_product type='td' flow='size' value=''}
		{stat_product type='td' flow='storage_mantissa' value='' }
		<td>&nbsp;</td>
	</tr>
	{/if}
	<!-- 进货入库 -->
	{if $rights.instock}
	<tr>
		<td class="t_right">{$lang.in_stock_qn}</td>
		{stat_product type='td' flow='warehouse' value=''}
		{stat_product type='td' flow='storage_format' value=''}
		{stat_product type='td' flow='storage_format' value=$run_info.stock_sum_qn url=U("/StatProduct/productInstock/type/instock/id/$id") title="productInstock"|title:"StatProduct" class="t_right"}
		
		<td class="t_right"><a href="javascript:;" onclick="addTab('{"/StatProduct/productInstock/type/instock/id/$id"|U}','{"productInstock"|title:"StatProduct"}')">{$run_info.stock_quantity}</a></td>
		{stat_product type='td' flow='color' value=''}
		{stat_product type='td' flow='size' value=''}
		{stat_product type='td' flow='storage_mantissa' value='' }
		<td>&nbsp;</td>
	</tr>
	{/if}
	<!-- 期初库存 -->
	{if $rights.adjust}
	<tr>
		<td class="t_right">{$lang.ini_stock_qn}</td>
		{stat_product type='td' flow='warehouse' value=''}
		{stat_product type='td' flow='storage_format' value=''}
		{stat_product type='td' flow='storage_format' value=$run_info.init_sum_qn url=U("/StatProduct/productStorageIni/type/init/id/$id") title="productStorageIni"|title:"StatProduct" class="t_right"}
		<td class="t_right"><a href="javascript:;" onclick="addTab('{"/StatProduct/productStorageIni/type/init/id/$id"|U}','{"productStorageIni"|title:"StatProduct"}')">{$run_info.init_quantity}</a></td>
		{stat_product type='td' flow='color' value=''}
		{stat_product type='td' flow='size' value=''}
		{stat_product type='td' flow='storage_mantissa' value='' }
		<td>&nbsp;</td>
	</tr>
	{/if}
	<!-- 退货入库 -->
	{if $rights.return}
	<tr>
		<td class="t_right">{$lang.return_qn}（{$lang.usefull}）</td>
		{stat_product type='td' flow='warehouse' value=''}
		{stat_product type='td' flow='storage_format' value=''}
		{stat_product type='td' flow='storage_format' value=$run_info.use_qn url=U("/StatProduct/productReturn/type/return/is_use/1/id/$id") title="productReturn"|title:"StatProduct" class="t_right"}
		
		<td class="t_right"><a href="javascript:;" onclick="addTab('{"/StatProduct/productReturn/type/return/is_use/1/id/$id"|U}','{"productReturn"|title:"StatProduct"}')">{$run_info.use_quantity}</a></td>
		{stat_product type='td' flow='color' value=''}
		{stat_product type='td' flow='size' value=''}
		{stat_product type='td' flow='storage_mantissa' value='' }
		<td>&nbsp;</td>
	</tr>
	<!-- 退货入库 -->
	<tr>
		<td class="t_right">{$lang.return_qn}（{$lang.unusefull}）</td>
		{stat_product type='td' flow='warehouse' value=''}
		{stat_product type='td' flow='storage_format' value=''}
		{stat_product type='td' flow='storage_format' value=$run_info.no_use_qn url=U("/StatProduct/productReturn/type/return/is_use/2/id/$id") title="productReturn"|title:"StatProduct" class="t_right"}
		
		<td class="t_right"><a href="javascript:;" onclick="addTab('{"/StatProduct/productReturn/type/return/is_use/2/id/$id"|U}','{"productReturn"|title:"StatProduct"}')">{$run_info.no_use_quantity}</a></td>
		{stat_product type='td' flow='color' value=''}
		{stat_product type='td' flow='size' value=''}
		{stat_product type='td' flow='storage_mantissa' value='' }
		<td>&nbsp;</td>
	</tr>
	{/if}
	<!-- 仓库调整 增加 -->
	{if $rights.adjust}
	<tr>
		<td class="t_right">{$lang.adjust_qn}（{$lang.increase}）</td>
		{stat_product type='td' flow='warehouse' value=''}
		{stat_product type='td' flow='storage_format' value=''}
		{stat_product type='td' flow='storage_format' value=$run_info.adjust_in_sum_qn url=U("/StatProduct/productAdjust/type/adjust/add/1/id/$id") title="productAdjust"|title:"StatProduct" class="t_right"}
		
		<td class="t_right"><a href="javascript:;" onclick="addTab('{"/StatProduct/productAdjust/type/adjust/add/1/id/$id"|U}','{"productAdjust"|title:"StatProduct"}',1)">{$run_info.adjust_in_quantity}</a></td>
		{stat_product type='td' flow='color' value=''}
		{stat_product type='td' flow='size' value=''}
		{stat_product type='td' flow='storage_mantissa' value='' }
		<td>&nbsp;</td>
	</tr>
	{/if}
	<tr>
		<td colspan="9"></td>
	</tr>
	<!-- 销售 -->
	{if $rights.sale}
	<tr>
		<td class="t_right">{$lang.sale_qn}</td>
		{stat_product type='td' flow='warehouse' value=''}
		{stat_product type='td' flow='storage_format' value=''}
		{stat_product type='td' flow='storage_format' value=$run_info.sale_sum_qn url=U("/StatProduct/productSale/type/sale/id/$id") title="productSale"|title:"StatProduct" class="t_right"}
		
		<td class="t_right"><a href="javascript:;" onclick="addTab('{"/StatProduct/productSale/type/sale/id/$id"|U}','{"productSale"|title:"StatProduct"}')">{$run_info.sale_quantity}</a></td>
		{stat_product type='td' flow='color' value=''}
		{stat_product type='td' flow='size' value=''}
		{stat_product type='td' flow='storage_mantissa' value='' }
		<td>&nbsp;</td>
	</tr>
	{/if}
	<!-- 发货 -->
	{if $rights.sale}
	<tr>
		<td class="t_right">{$lang.delivery_qn}</td>
		{stat_product type='td' flow='warehouse' value=''}
		{stat_product type='td' flow='storage_format' value=''}
		{stat_product type='td' flow='storage_format' value=$run_info.delivery_sum_qn url=U("/StatProduct/productDelivery/type/delivery/id/$id") title="productDelivery"|title:"StatProduct" class="t_right"}
		
		<td class="t_right"><a href="javascript:;" onclick="addTab('{"/StatProduct/productSale/type/delivery/id/$id"|U}','{"productDelivery"|title:"StatProduct"}')">{$run_info.delivery_quantity}</a></td>
		{stat_product type='td' flow='color' value=''}
		{stat_product type='td' flow='size' value=''}
		{stat_product type='td' flow='storage_mantissa' value='' }
		<td>&nbsp;</td>
	</tr>
	{/if}
	<!-- 调整 减少 -->
	{if $rights.adjust}
	<tr>
		<td class="t_right">{$lang.adjust_qn}（{$lang.reduce}）</td>
		{stat_product type='td' flow='warehouse' value=''}
		{stat_product type='td' flow='storage_format' value=''}
		{stat_product type='td' flow='storage_format' value=$run_info.adjust_re_sum_qn url=U("/StatProduct/productAdjust/type/adjust/add/2/id/$id") title="productAdjust"|title:"StatProduct" class="t_right"}
		
		<td class="t_right"><a href="javascript:;" onclick="addTab('{"/StatProduct/productAdjust/type/adjust/add/2/id/$id"|U}','{"productAdjust"|title:"StatProduct"}')">{$run_info.adjust_re_quantity}</a></td>
		{stat_product type='td' flow='color' value=''}
		{stat_product type='td' flow='size' value=''}
		{stat_product type='td' flow='storage_mantissa' value='' }
		<td>&nbsp;</td>
	</tr>
	{/if}
	<!-- 可销售库存 -->
	{if $rights.storage}
	<tr>
		<th>{$lang.sale_storage}</th>
		{stat_product type='th' flow='warehouse' value=''}
		{stat_product type='th' flow='storage_format' value=$lang.storage_format1}</th>
		{stat_product type='th' flow='storage_format' value=$lang.quantity}
		<th>{$lang.sum_quantity}</th>
		{stat_product type='th' flow='color' value=$lang.color_name}
		{stat_product type='th' flow='size' value=$lang.size_name}
		{stat_product type='th' flow='storage_mantissa' value=$lang.mantissa_2 }
		<th>&nbsp;</th>
	</tr>
	{foreach item=item key=key from=$storage_info.sale_storage.list}
	<tr>
		<td></td>
		{stat_product type='td' flow='warehouse' value=''}
		{stat_product type='td' flow='storage_format' value=$item.storage_format}
		{stat_product type='td' flow='storage_format' value=$item.dml_sum_qn class="t_right"}
		
		<td class="t_right">{$item.dml_all_sale_storage}</td>
		{stat_product type='td' flow='color' value=$item.color_name}
		{stat_product type='td' flow='size' value=$item.size_name}
		{stat_product type='td' flow='storage_mantissa' value=$item.mantissa_desc }
		<td>&nbsp;</td>
	</tr>
	{/foreach}
	<tr class="red">
		<td class="t_right">{$lang.total}：</td>
		{stat_product type='td' flow='warehouse' value=''}
		{stat_product type='td' flow='storage_format' value=''}
		{stat_product type='td' flow='storage_format' value=$storage_info.sale_storage.total.sum_qn class="t_right"}
		
		<td class="t_right">{$storage_info.sale_storage.total.dml_all_sale_storage}</td>
		{stat_product type='td' flow='color' value=''}
		{stat_product type='td' flow='size' value=''}
		{stat_product type='td' flow='storage_mantissa' value='' }
		<td>&nbsp;</td>
	</tr>
	<!-- 实际库存 -->
	<tr>
		<th>{$lang.real_storage}</th>
		{stat_product type='th' flow='warehouse' value=$lang.warehouse}
		{stat_product type='th' flow='storage_format' value=$lang.storage_format1}
		{stat_product type='th' flow='storage_format' value=$lang.quantity}
		<th>{$lang.sum_quantity}</th>
		{stat_product type='th' flow='color' value=$lang.color_name}
		{stat_product type='th' flow='size' value=$lang.size_name}
		{stat_product type='th' flow='storage_mantissa' value=$lang.mantissa_2 }
		<th>&nbsp;</th>
	</tr>
	{foreach item=item key=key from=$storage_info.storage.list}
	<tr>
		<td></td>
		{stat_product type='td' flow='warehouse' value=$item.w_name}
		{stat_product type='td' flow='storage_format' value=$item.storage_format}
		{stat_product type='td' flow='storage_format' value=$item.dml_sum_qn class="t_right"}
		
		<td class="t_right">{$item.dml_storage}</td>
		{stat_product type='td' flow='color' value=$item.color_name}
		{stat_product type='td' flow='size' value=$item.size_name}
		{stat_product type='td' flow='storage_mantissa' value=$item.mantissa_desc }
		<td>&nbsp;</td>
		
	</tr>
	{/foreach}
	<tr class="red">
		<td class="t_right">{$lang.total}：</td>
		{stat_product type='td' flow='warehouse' value=''}
		{stat_product type='td' flow='storage_format' value=''}
		{stat_product type='td' flow='storage_format' value=$storage_info.storage.total.sum_qn class="t_right"}
		<td class="t_right">{$storage_info.storage.total.storage}</td>
		{stat_product type='td' flow='color' value=''}
		{stat_product type='td' flow='size' value=''}
		{stat_product type='td' flow='storage_mantissa' value='' }
		<td>&nbsp;</td>
	</tr>
	{/if}
</table>
















